<div class="well well-small">
    <h3>Document Search</h3>
</div>

<?php
// Search Form
//$this->form()->setAttribute('class', 'Form');
echo $this->form()->openTag($this->form);
	foreach ($this->form as $element) {
		echo $this->formElement($element);
		echo $this->formElementErrors($element);
	}
echo $this->form()->closeTag();
// Search Results
if (count($this->searchResults)) {
?>
<div class="well well-small">
    <?php $title='Result';?>
    <h3><?php echo $this->escapeHtml($title); ?></h3>
</div>
<table style="width: 600px; border:3px solid #f5f5f5;" class="table">
	<tr>
		<th width="30%" align="left"> Label</th>
		<th width="30%" align="left"> Owner</th>
		<th align="left"> File</th>
	</tr>
<?php foreach ($this->searchResults as $searchResult) {
?>
	<tr>
		<td><?php echo $searchResult->label; ?></td>
		<td><?php echo $searchResult->owner; ?></td>
		<td><a href="<?php echo $this->escapeHtml($this->url('upploadmanager',
		array('action'=>'fileDownload', 'id' =>$searchResult->upload_id)));?>">Download</a></td>
	</tr>
<?php
}
?>
</table>
<?php }?>
